home *** CD-ROM | disk | FTP | other *** search
/ mail.altrad.com / 2015.02.mail.altrad.com.tar / mail.altrad.com / TEST / office deutch / INFOPATH.NL-NL / INFLR.CAB / FL_CalculateaMonthlyPaymentonaLoan_snippet_142714_ENU____.3643236F_FC70_11D3_A536_0090278A1BB8 < prev    next >
Extensible Markup Language  |  2005-10-28  |  2KB  |  44 lines

  1. <?xml version="1.0"?>
  2. <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  3.   <CodeSnippet Format="1.0.0">
  4.     <Header>
  5.       <Title>Calculate a Monthly Payment on a Loan</Title>
  6.       <Author>Microsoft Corporation</Author>
  7.       <Description>Calculates the monthly payment on a loan.</Description>
  8.       <Shortcut>mathPayLoan</Shortcut>
  9.     </Header>
  10.     <Snippet>
  11.       <Imports>
  12.         <Import>
  13.           <Namespace>System</Namespace>
  14.         </Import>
  15.         <Import>
  16.           <Namespace>Microsoft.VisualBasic</Namespace>
  17.         </Import>
  18.       </Imports>
  19.       <Declarations>
  20.         <Literal>
  21.           <ID>annualInterestRate</ID>
  22.           <Type>Double</Type>
  23.           <ToolTip>Replace with a Double for the annual interest rate (e.g. 0.05 for 5%).</ToolTip>
  24.           <Default>.05</Default>
  25.         </Literal>
  26.         <Literal>
  27.           <ID>numberOfPayments</ID>
  28.           <Type>Double</Type>
  29.           <ToolTip>Replace with code that returns a Double for the total number of monthly payments.</ToolTip>
  30.           <Default>36</Default>
  31.         </Literal>
  32.         <Literal>
  33.           <ID>loanAmount</ID>
  34.           <Type>Double</Type>
  35.           <ToolTip>Replace with code that returns a Double for the loan amount.</ToolTip>
  36.           <Default>1000</Default>
  37.         </Literal>
  38.       </Declarations>
  39.       <Code Language="VB" Kind="method body"><![CDATA[Dim futureValue As Double = 0
  40. Dim payment As Double
  41. payment = Pmt($annualInterestRate$ / 12, $numberOfPayments$, -$loanAmount$, futureValue, DueDate.EndOfPeriod)]]></Code>
  42.     </Snippet>
  43.   </CodeSnippet>
  44. </CodeSnippets>